import json
import random
import os

with open('./bladder_train.json', 'r', encoding='utf-8') as f:
    val = json.load(f)

test_list = []
for info in val:
    r = random.randint(1, 10)
    if r < 3:
        test_list.append(info)


with open('bladder' + str(len(test_list)) + '_train.json', 'w', encoding='utf-8') as f:
    json.dump(test_list, f)

